/*
 * Copyright 2012 ITC Tsinghua University. All Rights Reserved.
 */
package cn.edu.tsinghua.cic.ccss.bo;

import java.util.List;

import org.forten.core.ro.DtoResultWithPageInfo;

import cn.edu.tsinghua.cic.ccss.dto.CourseCanceledDto;
import cn.edu.tsinghua.cic.ccss.dto.CourseSelectionDto;
import cn.edu.tsinghua.cic.ccss.dto.SelectedCourseDto4Export;
import cn.edu.tsinghua.cic.ccss.qo.CourseSelectionQo;

/**
 * 
 * 
 * @author <a href="mailto:du_yi@bbn.cn">Duyi</a>
 * 
 * @since 2012-5-14
 */
public interface CourseSelectBo {
	void selectCourse4Admin(Long courseId, String optUserNum, Long... cadreIds);

	void selectCourse4Cadre(Long cadreId, String optUserNum, Long courseId);

	List<CourseSelectionDto> queryStudentsForThisCourse(Long courseId);

	List<CourseSelectionDto> queryCoursesForThisStudent(Long cadreId);

	boolean isOverMaxCredit(Long cadreId, Long courseId);

	boolean isOverMaxStudents(Long courseId);
	
	boolean isOverTime(Long courseId);

	Long getIdByCardNum(String cardNum);

	void cancelCourse(Long selectedCourseId, String cancelReason);

	List<CourseCanceledDto> queryStudentsForThisCourseWithCancelInfo(
			Long courseId);

	DtoResultWithPageInfo<CourseSelectionDto> queryCourseSelection(
			CourseSelectionQo qo, int page);

	DtoResultWithPageInfo<CourseCanceledDto> queryCourseCanceled(
			CourseSelectionQo qo, int page);

	boolean isEnableCancelCourse(Long selectedCourseId);

	void leave4Admin(Long selectedCourseId, String state, String leaveReason);

	void leave4Cadre(Long selectedCourseId, String leaveReason);
	
	List<SelectedCourseDto4Export> export(CourseSelectionQo courseSelectionQo);
}
